﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="list_nghiphep.aspx.cs" Inherits="list_nghiphep" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxtoolkit" %>


<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Thong tin nghi phep</title>
     <link href="../styles/style.css" rel="stylesheet" type="text/css" /> 
     <link type="text/css" href="../css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
    <script src="../js/jquery-1.5.min.js" type="text/javascript"></script>
    <script src="../js/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>
    <script src="../js/jquery.validationEngine.js" type="text/javascript"></script>
         <script type="text/javascript">
        $(function() {
        $("input[id$=txtFromDate]").datepicker({
                yearRange: "+0:+0",
                dateFormat: 'dd/mm/yy',
                changeMonth: true,
                changeYear: false
            });

            $("input[id$=txtToDate]").datepicker({
            yearRange: "+0:+0",
            changeMonth: true,
            dateFormat: 'dd/mm/yy',
            changeYear: false
            });
        });

       
    </script>
</head>
<body>
       <form id="form1" runat="server">

    <div class="wrapper">
         <div id="header">
		<h1 class="logo">
        <a href="index.aspx">
        	<img src="../images/logo.png" width="280" height="46" border="0" /></a>
        
        </h1>
         <div class="login_zone" >
                Username:<asp:Literal ID="lUsername" Text="" runat="server" />
                <br />
                 <asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" 
                    onclick="lnkLogout_Click" /> | <a href="../users/change_pass.aspx">Change password</a>
        </div>
        </div>
             <div id="nav">
      <div style="width:300px;float:left;">
              <ul class="breadcrumb">
        <li>
            <a href="index.aspx" title="Home">
         
                 <img src="../images/home.png" width="24" height="23" border="0" align="left" style="margin-top:2px;" class="home" />
      
            </a>
              
            </li>
            <li>
            <a href="index.aspx"   title="homepage">
                Trang chủ
                </a>
            </li>
        <li>
            
               Danh sách nghỉ phép
            
       </li>
       
     </ul>
     </div>

        </div>
   


    <div class="main_content2">
       <div style="margin-top:-8px;">
             <img src="../images/thongtin_nghiphep.png" width="900" height="77" />
           </div>
           <br /><br />
           <div style="padding-left:20px;padding-bottom:20px;width:880px;line-height:150%;float:left;text-align:left;">
               <table width="700px;">
                <tr>
                 <td colspan="4">
                   <div style="width:120px;float:left;padding-bottom:10px;">
                    Phòng ban:
                   </div>
                    <div  style="width:120px;float:left;">    
                    <asp:DropDownList ID="cbPhongBan" runat="server" EnableTheming="True" 
                                CssClass="combox_nghiphep" AutoPostBack="True" 
                            onselectedindexchanged="cbPhongBan_SelectedIndexChanged"> 
                               
                    </asp:DropDownList> </div>
                 </td>
                 
                </tr>
                
                <tr>
                    <td align="left" valign="bottom">
                        <div align="left" style="width:120px;float:left;margin-top:4px;">
                         Từ ngày:
                         </div>
                    
                       <div align="left" style="width:156px; float:left;">
                       <asp:TextBox ID="txtFromDate" runat="server" CssClass="box2" TabIndex="1" 
                        Width="80px"></asp:TextBox>
                        </div>
                        <div align="left" style="width:80px;float:left;margin-top:4px;">
                        đến ngày:
                        </div>
                    
                      
                     <div align="left" style="width:98px; float:left;">
                    <asp:TextBox ID="txtToDate" runat="server" CssClass="box2" TabIndex="1" 
                        Width="80px"></asp:TextBox>
                        
                        
                        </div>
                        <div style="float:left;margin-left:20px;padding-right:10px;">
                                                        
                            <asp:Button ID="btnView" runat="server" Text="View" 
                               CssClass="button white" onclick="btnView_Click" />
                            
                        
                        </div>
                     
                            <asp:Button ID="btnReload" runat="server" Text="Reload" 
                               CssClass="button white" onclick="btnReload_Click" />
                            
                        
                    </td>
                </tr>
               </table>
               
           </div>
            <div id="clear"></div>
           <div style="width:880px;height:auto;float:left;padding-left:10px;">
               <dx:ASPxGridView ID="gdNghiPhep" runat="server" AutoGenerateColumns="False" 
                   Width="880px" oncustombuttoncallback="gdNghiPhep_CustomButtonCallback" 
                   KeyFieldName="nghiphepid" onrowcommand="gdNghiPhep_RowCommand1" 
                   ClientInstanceName="gridNghiPhep" 
                   onhtmlrowcreated="gdNghiPhep_HtmlRowCreated">
                   <SettingsPager AlwaysShowPager="True">
                   </SettingsPager>
                   <Columns>
                    <dx:GridViewDataTextColumn Caption="Operators" VisibleIndex="0" Width="80px">
                    
                        <DataItemTemplate>
                         <asp:LinkButton 
                                 runat="server" 
                                 ID="btnDeleteNghiPhep" 
                                 Text="Delete"                             
                                 CommandName="XoaNghiPhep"
                              >
                              </asp:LinkButton>
                        </DataItemTemplate>
                    
                    </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="1" FieldName="truongphong" 
                           Caption="Trưởng phòng" Visible="False">
                        
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="2" Caption="Nhân sự" 
                           Width="80px" Visible="False">
                             <Settings AllowAutoFilter="False" />
                                                  
                            
                        
                        <Settings AllowAutoFilter="False" />
                             <CellStyle HorizontalAlign="Left">
                             </CellStyle>
                             <CellStyle ForeColor="#0057A1" HorizontalAlign="Left">
                             </CellStyle>
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn VisibleIndex="3" FieldName="giamdoc" Caption="Giám đốc" 
                           Width="80px">    
                                               
                           <Settings AllowAutoFilter="False" />
                           <Settings AllowAutoFilter="False" />
                           <DataItemTemplate>
                                <asp:LinkButton 
                                 runat="server" 
                                 ID="btnUpdateNhanSu" 
                                 Text='<%#Eval("giamdoc") %>'                            
                                 CommandName="DuyetNghiPhep"
                                 
                              >
                              
                             </asp:LinkButton>
                             
                              
                            </DataItemTemplate>  
                       </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="ID" VisibleIndex="4" FieldName="nghiphepid" 
                            Visible="false">
                             <Settings AllowAutoFilter="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Phòng ban" VisibleIndex="5" 
                           FieldName="tenphongban" Width="140px">
                           
                            <Settings AllowHeaderFilter="True" />
                           
                       </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Họ tên" VisibleIndex="6" 
                           FieldName="fullname" Width="180px">
                            <Settings AllowHeaderFilter="True" />
                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                       
                       <dx:GridViewDataTextColumn Caption="Nghỉ từ ngày" VisibleIndex="7" 
                           FieldName="nghipheptungay">
                           
                            <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                            </PropertiesTextEdit>
                           
                            <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                            </PropertiesTextEdit>
                           
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Nghỉ đến ngày" VisibleIndex="8" 
                           FieldName="nghiphepdenngay">
                           <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                           </PropertiesTextEdit>
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Thời gian nghỉ" VisibleIndex="9" 
                           FieldName="thoigiannghi">
                        
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Lý do nghỉ" VisibleIndex="10" Width="200px" 
                           FieldName="lydo">
                            
                           <Settings AllowAutoFilter="False" />
                            
                           <CellStyle HorizontalAlign="Left">
                           </CellStyle>
                            
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Loại phép" VisibleIndex="11" 
                           FieldName="loaiphep">
                       </dx:GridViewDataTextColumn>
                       <dx:GridViewDataTextColumn Caption="Ngày đăng ký" VisibleIndex="13" 
                           FieldName="ngaydangky">
                         <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy"></PropertiesTextEdit>
                       </dx:GridViewDataTextColumn>
                       
                        <dx:GridViewDataTextColumn Caption="Email" VisibleIndex="12" FieldName="email" 
                           Width="220px">
                            <CellStyle HorizontalAlign="Left">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                       
                   </Columns>
                    
                   <Settings ShowHorizontalScrollBar="True" ShowFilterRow="True" />
                    
               </dx:ASPxGridView>   
           </div>
        <asp:Panel ID="panelEdit" runat="server">    
            <ajaxtoolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </ajaxtoolkit:ToolkitScriptManager>
         <br />
            <table style="width: 500px; background-color: #ffffdd;filter: alpha(opacity=0.9);opacity: 0.9;" >
            <tr>
                <td>
                
                    &nbsp; </td>
            
            </tr>
         </table>
        </asp:Panel>
        
         <asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
        <ajaxtoolkit:modalpopupextender  ID="popupEdit" runat="server"
                     PopupControlID="panelEdit" TargetControlID="lnkFake" />
       
    
     </div>
     
</div>     
     </form>
</body>
</html>
